home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gTowns, gJobs, gPTotalResult, gCash, gCityDB, gShopDB
- puppetSound("Sledge")
- updateStage()
- set K to count(gTowns) - 1
- set L to []
- repeat with n = 2 to K
- if not getOne(L, getAt(gTowns, n)) then
- append(L, 1)
- end if
- end repeat
- set K to count(L)
- repeat with n = 0 to K
- set the text of field 111 to string(n)
- end repeat
- repeat while soundBusy(1)
- end repeat
- go(the frame + 1)
- WaitH(30, 0)
- puppetSound("Sledge")
- updateStage()
- set K to count(gJobs)
- repeat with n = 0 to K
- set the text of field 112 to string(n)
- end repeat
- repeat while soundBusy(1)
- end repeat
- go(the frame + 1)
- WaitH(30, 0)
- puppetSound("Sledge")
- updateStage()
- set Continent to getAt(getAt(gCityDB, PICDB(getLast(gTowns))), 4)
- case Continent of
- "NA":
- set Continent to 1
- "SA":
- set Continent to 2
- "AF":
- set Continent to 3
- "AU":
- set Continent to 4
- "EA":
- set Continent to 5
- "EE":
- set Continent to 6
- "EU":
- set Continent to 7
- end case
- set currency to getAt(getAt(gCityDB, PICDB(getAt(gTowns, 1))), 6)
- set exchangefactor to getAt(getAt(gCityDB, PICDB(getAt(gTowns, 1))), 7)
- set LIVC to getAt(getAt(gCityDB, PICDB(getLast(gTowns))), 9)
- set sum to 0
- repeat with n = 1 to 5
- if getAt(getAt(gPlayerPack, n), 1) then
- set g to getAt(gShopDB, PISDB(getAt(getAt(gPlayerPack, n), 1)))
- set supdemL to getAt(g, 4 + Continent)
- set price to getAt(g, 4) * ((getAt(supdemL, 2) + 0.0) / (getAt(supdemL, 1) + 0.0)) * LIVC
- set sum to sum + price
- end if
- end repeat
- set sum to integer(sum / exchangefactor)
- if sum > 1000 then
- set the text of field 115 to string(sum)
- else
- repeat with n = 0 to sum
- set the text of field 115 to string(n)
- end repeat
- end if
- set the text of field 115 to the text of field 115 && currency
- repeat while soundBusy(1)
- end repeat
- go(the frame + 1)
- WaitH(30, 0)
- puppetSound("Sledge")
- updateStage()
- set gCash to integer(gCash / exchangefactor)
- if gCash > 1000 then
- set the text of field 116 to string(gCash)
- else
- repeat with n = 0 to gCash
- set the text of field 116 to string(n)
- end repeat
- end if
- set the text of field 116 to the text of field 116 && currency
- repeat while soundBusy(1)
- end repeat
- go(the frame + 2)
- WaitH(30, 0)
- puppetSound("Sledge")
- updateStage()
- set K to getAt(gPTotalResult, 1)
- repeat with n = 0 to K
- set the text of field 114 to string(n)
- end repeat
- end
-